<?php
require_once '../include/template_parser.php';

class MainView {
	function __construct() {}

	function display( $nickname, $calendario, $cal_tittle, $shoutbox, $anuncios, $is_admin = '') {

		$url_admin = $is_admin ? "<a href='index.php?func=".FUNC_ADMIN."' ><span id=\"spa_not\" class=\"bt_session bt_not tariel_session\">A</span></a>" : '';

		$tags = array(
			'top_bar.php' => '../template/top_bar.php',
			'texto_down1' => 'VSN LCC &#169; 2012',
			'nombre_usuario' => '&nbsp'.$nickname.'&nbsp',
			'calendario' => $calendario,
			'cal_tittle' => $cal_tittle,
			'anuncios' => $anuncios,
			'shoutbox' => $shoutbox,
			'FUNC_ARCH' => FUNC_ARCH,
			'FUNC_PERF' => FUNC_PERF,

			'panel_admin' => $url_admin
			);
		$template_parser = new TemplateParser( '../template/main_template.php', $tags);
		echo $template_parser->parse_template();
	}

}

?> 
